Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas 49 posts 21 karma points
    May 11, 2009 @ 19:30
    Jonas
    0

    Media breadcrumb [solved]

    Hi!

    Can someone tell me how to properly iterate over the ancestors of a media node to get a media breadrumb?

    [code][/code]

    This code only gives me the MediaRootId medianode. What have I missed?

  • Paul Blair 466 posts 731 karma points
    May 11, 2009 @ 23:32
    Paul Blair
    0

    try changing the 'false' value to 'true' in the GetMedia call

  • Finn 86 posts 50 karma points
    May 12, 2009 @ 08:50
    Finn
    0

    Here’s a bit of code I use. Hopefully it will help you get further.

    [code]


    [/code]

    /Finn

  • Jonas 49 posts 21 karma points
    May 13, 2009 @ 09:16
    Jonas
    0

    Hi, thanks, but I'm not sure how to use your code for my case, I needed the ancestors of the selected media node, to get this:

    [quote]Documents \ All images \ Colored images \ Red images \ [/quote]

    When the media-list displays all files in the "Red images" folder.

    (as an example)

    I guess that GetMedia only returns one node (and its children if specified), never the ancestors. Right?

    However, I finally used the @path to display my breadcrumb correctly. @path contains all the ancestors up to root as comma delimited node id's ('-1,1300,1900,2105,2199').

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    May 13, 2009 @ 10:27
    Warren Buckley
    0

    Prgjonas its intresting to hear how you solved this problem but for anyone else reading this post in the future it could be useful to include the snipper of code on how you solved this as a point of reference please.

    Thanks,
    Warren :)

  • Jonas 49 posts 21 karma points
    May 15, 2009 @ 10:55
    Jonas
    0

    Warren, yes, absolutely, I'm not finished yet, thats why I haven't posted my code before, but here's my current version. It displays all folders back to the root folder (Documents).

    [quote]Documents \ All images \ Colored images \ Red images \ [/quote]

    I used this code to split a string : http://www.abbeyworkshop.com/howto/xslt/xslt-split-values/index.html

    [code]

    [/code]

Please Sign in or register to post replies

Write your reply to:

Draft